﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="Zhongchouwwwww.webform.Admin" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <div style="width: 70%; padding: 10px; border: solid black 1px">
                <asp:Button runat="server" ID="userbtn" OnClick="userbtn_Click"  Text="用户管理" />
                <asp:Button runat="server" ID="projectbtn" OnClick="projectbtn_Click"  Text="项目审核" />
                <asp:Button runat="server" ID="addressbtn"  OnClick="addressbtn_Click"  Text="用户收货地址管理" />
                <asp:Button runat="server" ID="launchbtn" OnClick="launchbtn_Click"  Text="项目发起人收款信息" />
                <asp:Button runat="server" ID="returnsetbtn" OnClick="returnsetbtn_Click"  Text="项目回报表" />
                <asp:Button Text="评论表" ID="Commentbtn" OnClick="Commentbtn_Click" runat="server" />
            </div>
            <div style="width: auto; margin-right: 20px; border: solid black 1px">
                <asp:Panel ID="Userr" runat="server">
                    <table border="1">
                        <tr>
                            <th>用户id</th>
                            <th>用户昵称</th>
                            <th>用户性别</th>
                            <th>用户手机号</th>
                            <th>用户注册时间</th>
                            <th>账号状态</th>
                            <th>操作</th>
                        </tr>
                        <asp:Repeater ID="UserData" OnItemCommand="UserData_ItemCommand" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <td><%# Eval("userid") %></td>
                                    <td><%# Eval("usernikename") %></td>
                                    <td><%# Eval("sex") %></td>
                                    <td><%# Eval("userphone") %></td>
                                    <td><%# Eval("registertime","{0:d}") %></td>
                                    <td><%# Eval("userstate") %></td>
                                    <td>
                                        <asp:LinkButton Text="封禁" OnClientClick='return confirm("确定封禁该用户吗？")' CommandName="DDDDD" CommandArgument='<%# Eval("userid") %>' runat="server" />
                                        <asp:LinkButton Text="解封" CommandName="EEEEE" CommandArgument='<%# Eval("userid")+""+Eval("userstate") %>' runat="server" />
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                </asp:Panel>
                <asp:Panel ID="Proje" runat="server">
                    <table border="1">
                        <tr>
                            <th>项目id</th>
                            <th>项目名称</th>
                            <th>项目简介</th>
                            <th>项目筹备天数</th>
                            <th>项目需要金额</th>
                            <th>项目收到金额</th>
                            <th>项目发起人</th>
                            <th>项目状态</th>
                            <th>项目操作</th>
                        </tr>
                        <asp:Repeater ID="ProjectDate" OnItemCommand="ProjectDate_ItemCommand" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <td><%# Eval("projectid") %></td>
                                    <td><%# Eval("projectname") %></td>
                                    <td><%# Eval("projectdesc") %></td>
                                    <td><%# Eval("time") %>天</td>
                                    <td>￥<%# Eval("targetmoney") %></td>
                                    <td>￥<%# Eval("incomemoney") %></td>
                                    <td><%# Eval("ProjectUser") %></td>
                                    <td><%# Eval("state") %></td>
                                    <td>
                                        <asp:LinkButton Text="通过审核" CommandName="AAAA" CommandArgument='<%# Eval("projectid") %>' runat="server" />
                                        <asp:LinkButton Text="完成众筹" CommandName="BBBB" CommandArgument='<%# Eval("projectid") %>' runat="server" />
                                        <asp:LinkButton Text="删除项目" CommandName="CCCC" CommandArgument='<%# Eval("projectid") %>' runat="server" />
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                </asp:Panel>
                <asp:Panel ID="Add" runat="server">
                    <asp:GridView ID="Addre" runat="server" AutoGenerateColumns="False" DataKeyNames="addressid" DataSourceID="SqlDataSource1">

                        <Columns>
                            <asp:BoundField DataField="addressid" HeaderText="收货地址ID" InsertVisible="False" ReadOnly="True" SortExpression="addressid" />
                            <asp:BoundField DataField="username" HeaderText="收货人" SortExpression="username" />
                            <asp:BoundField DataField="userphone" HeaderText="电话号码" SortExpression="userphone" />
                            <asp:BoundField DataField="addresscity" HeaderText="城市" SortExpression="addresscity" />
                            <asp:BoundField DataField="address" HeaderText="详细地址" SortExpression="address" />
                            <asp:BoundField DataField="userid" HeaderText="用户ID" SortExpression="userid" />
                            <asp:BoundField DataField="postcode" HeaderText="邮编" SortExpression="postcode" />
                        </Columns>

                    </asp:GridView>
                        
                        
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=120.77.207.216;Initial Catalog=ZhongchouDB;Persist Security Info=True;User ID=sa;Password=123456" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [addressid], [username], [userphone], [addresscity], [address], [userid], [postcode] FROM [Addressinfo]"></asp:SqlDataSource>
                        
                        
                </asp:Panel>
                <asp:Panel ID="Launch" runat="server">
                    <asp:GridView ID="Launchhhh" runat="server" AutoGenerateColumns="False" DataKeyNames="launchid" DataSourceID="SqlDataSource2">

                        <Columns>
                            <asp:BoundField DataField="launchid" HeaderText="收款表ID" InsertVisible="False" ReadOnly="True" SortExpression="launchid" />
                            <asp:BoundField DataField="launchname" HeaderText="真实姓名" SortExpression="launchname" />
                            <asp:BoundField DataField="address" HeaderText="地址" SortExpression="address" />
                            <asp:BoundField DataField="phone" HeaderText="电话" SortExpression="phone" />
                            <asp:BoundField DataField="subbranch" HeaderText="分行名称" SortExpression="subbranch" />
                            <asp:BoundField DataField="bankname" HeaderText="银行名称" SortExpression="bankname" />
                            <asp:BoundField DataField="accountname" HeaderText="开户人" SortExpression="accountname" />
                            <asp:BoundField DataField="banknumber" HeaderText="银行卡号 " SortExpression="banknumber" />
                            <asp:BoundField DataField="projectid" HeaderText="项目ID" SortExpression="projectid" />
                        </Columns>

                    </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="Data Source=120.77.207.216;Initial Catalog=ZhongchouDB;Persist Security Info=True;User ID=sa;Password=123456;MultipleActiveResultSets=True;Application Name=EntityFramework" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [launchid], [launchname], [address], [phone], [subbranch], [bankname], [accountname], [banknumber], [projectid] FROM [Launchinfo]"></asp:SqlDataSource>
                </asp:Panel>
                <asp:Panel ID="Returnset" runat="server">
                    <asp:GridView ID="Returnsetttt" runat="server" AutoGenerateColumns="False" DataKeyNames="returnid" DataSourceID="SqlDataSource3">

                        <Columns>
                            <asp:BoundField DataField="returnid" HeaderText="回报表ID" InsertVisible="False" ReadOnly="True" SortExpression="returnid" />
                            <asp:BoundField DataField="number" HeaderText="名额" SortExpression="number" />
                            <asp:BoundField DataField="supportmoney" HeaderText="需要金额" SortExpression="supportmoney" />
                            <asp:BoundField DataField="returncontent" HeaderText="具体回报内容" SortExpression="returncontent" />
                            <asp:BoundField DataField="time" HeaderText="回报天数" SortExpression="time" />
                            <asp:BoundField DataField="freight" HeaderText="邮费" SortExpression="freight" />
                            <asp:BoundField DataField="projectid" HeaderText="项目ID" SortExpression="projectid" />
                        </Columns>

                    </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="Data Source=120.77.207.216;Initial Catalog=ZhongchouDB;Persist Security Info=True;User ID=sa;Password=123456;MultipleActiveResultSets=True;Application Name=EntityFramework" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [returnid], [number], [supportmoney], [returncontent], [time], [freight], [projectid] FROM [Returnsetinfo]"></asp:SqlDataSource>
                </asp:Panel>
                <asp:Panel ID="Comment" runat="server">
                    <table border="1">
                        <tr>
                            <th>评论表ID</th>
                            <th>评论详情</th>
                            <th>用户ID</th>
                            <th>项目ID</th>
                            <th>对哪个用户ID回复</th>
                            <th>评论时间</th>
                            <th>对哪个评论ID回复</th>
                            <th>控评操作</th>
                        </tr>
                        <asp:Repeater ID="CommentDate" OnItemCommand="CommentDate_ItemCommand" runat="server">
                            <ItemTemplate>
                                <tr>
                                <td><%# Eval("Commentid") %></td>
                                <td><%# Eval("Commentvalues") %></td>
                                <td><%# Eval("Userid") %></td>
                                <td><%# Eval("Projectid") %></td>
                                <td><%# Eval("Touserid") %></td>
                                <td><%# Eval("Sendtime") %></td>
                                <td><%# Eval("tocommentid") %></td>
                                <td>
                                    <asp:LinkButton Text="删评论" CommandName="POPOP" CommandArgument='<%# Eval("Commentid") %>' runat="server" /></td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                        
                    </table>
                </asp:Panel>
            </div>
        </div>
    </form>
</body>
</html>
